package com.liohi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName resources
 */
@TableName(value ="resources")
@Data
public class Resources implements Serializable {
    /**
     * 
     */
    @TableId(value = "resources_id", type = IdType.AUTO)
    private Integer resourcesId;

    /**
     * 
     */
    @TableField(value = "brief_introduction")
    private String briefIntroduction;

    /**
     * 
     */
    @TableField(value = "charge_person")
    private String chargePerson;

    /**
     * 
     */
    @TableField(value = "charge_person_phone")
    private String chargePersonPhone;

    /**
     * 
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 
     */
    @TableField(value = "env_adaptor")
    private String envAdaptor;

    /**
     * 设备表关联数据id数组
     */
    @TableField(value = "equipment_types")
    private String equipmentTypes;

    /**
     * 
     */
    @TableField(value = "introduction")
    private String introduction;

    /**
     * 
     */
    @TableField(value = "resource_name")
    private String resourceName;

    /**
     * 
     */
    @TableField(value = "resources_numbe")
    private String resourcesNumbe;

    /**
     * 
     */
    @TableField(value = "price")
    private Integer price;

    /**
     * 0可用 1不可用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 
     */
    @TableField(value = "teach_video")
    private String teachVideo;

    /**
     * 
     */
    @TableField(value = "thumbnail")
    private String thumbnail;

    /**
     * 用户类型 1老师 2学生 3社会人士
     */
    @TableField(value = "type")
    private String type;

    /**
     * 
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Resources other = (Resources) that;
        return (this.getResourcesId() == null ? other.getResourcesId() == null : this.getResourcesId().equals(other.getResourcesId()))
            && (this.getBriefIntroduction() == null ? other.getBriefIntroduction() == null : this.getBriefIntroduction().equals(other.getBriefIntroduction()))
            && (this.getChargePerson() == null ? other.getChargePerson() == null : this.getChargePerson().equals(other.getChargePerson()))
            && (this.getChargePersonPhone() == null ? other.getChargePersonPhone() == null : this.getChargePersonPhone().equals(other.getChargePersonPhone()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getEnvAdaptor() == null ? other.getEnvAdaptor() == null : this.getEnvAdaptor().equals(other.getEnvAdaptor()))
            && (this.getEquipmentTypes() == null ? other.getEquipmentTypes() == null : this.getEquipmentTypes().equals(other.getEquipmentTypes()))
            && (this.getIntroduction() == null ? other.getIntroduction() == null : this.getIntroduction().equals(other.getIntroduction()))
            && (this.getResourceName() == null ? other.getResourceName() == null : this.getResourceName().equals(other.getResourceName()))
            && (this.getResourcesNumbe() == null ? other.getResourcesNumbe() == null : this.getResourcesNumbe().equals(other.getResourcesNumbe()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTeachVideo() == null ? other.getTeachVideo() == null : this.getTeachVideo().equals(other.getTeachVideo()))
            && (this.getThumbnail() == null ? other.getThumbnail() == null : this.getThumbnail().equals(other.getThumbnail()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getResourcesId() == null) ? 0 : getResourcesId().hashCode());
        result = prime * result + ((getBriefIntroduction() == null) ? 0 : getBriefIntroduction().hashCode());
        result = prime * result + ((getChargePerson() == null) ? 0 : getChargePerson().hashCode());
        result = prime * result + ((getChargePersonPhone() == null) ? 0 : getChargePersonPhone().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getEnvAdaptor() == null) ? 0 : getEnvAdaptor().hashCode());
        result = prime * result + ((getEquipmentTypes() == null) ? 0 : getEquipmentTypes().hashCode());
        result = prime * result + ((getIntroduction() == null) ? 0 : getIntroduction().hashCode());
        result = prime * result + ((getResourceName() == null) ? 0 : getResourceName().hashCode());
        result = prime * result + ((getResourcesNumbe() == null) ? 0 : getResourcesNumbe().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTeachVideo() == null) ? 0 : getTeachVideo().hashCode());
        result = prime * result + ((getThumbnail() == null) ? 0 : getThumbnail().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", resourcesId=").append(resourcesId);
        sb.append(", briefIntroduction=").append(briefIntroduction);
        sb.append(", chargePerson=").append(chargePerson);
        sb.append(", chargePersonPhone=").append(chargePersonPhone);
        sb.append(", createTime=").append(createTime);
        sb.append(", envAdaptor=").append(envAdaptor);
        sb.append(", equipmentTypes=").append(equipmentTypes);
        sb.append(", introduction=").append(introduction);
        sb.append(", resourceName=").append(resourceName);
        sb.append(", resourcesNumbe=").append(resourcesNumbe);
        sb.append(", price=").append(price);
        sb.append(", status=").append(status);
        sb.append(", teachVideo=").append(teachVideo);
        sb.append(", thumbnail=").append(thumbnail);
        sb.append(", type=").append(type);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}